home *** CD-ROM | disk | FTP | other *** search
- #include "program globals.h"
- #include "generic open.h"
- #include "brlr load-save.h"
- #include "environment.h"
- #include "dialogs.h"
- #include "error.h"
- #include "print meat.h"
- #include "file utilities.h"
- #include "graphics.h"
- #include "window layer.h"
-
- void OpenTheFile(FSSpec *myFSS)
- {
- FSSpec saveFile;
-
- switch (GetFileType(myFSS))
- {
- case SAVE_TYPE:
- if (!IndWindowExistsQQ(kMainWindow))
- {
- saveFile=*myFSS;
- GetTheFile(&saveFile);
- gNeedToOpenWindow=FALSE;
- }
- else
- {
- RemoveHilitePatch();
- PositionDialog('ALRT', smallAlert);
- ParamText("\pPlease close the current text before opening another.","\p","\p","\p");
- StopAlert(smallAlert, 0L);
- InstallHilitePatch();
- }
- break;
- }
- }
-
- void PrintTheFile(FSSpec *myFSS)
- {
- WindowPtr theWindow;
-
- switch (GetFileType(myFSS))
- {
- case SAVE_TYPE:
- if (!IndWindowExistsQQ(kMainWindow))
- {
- GetTheFile(myFSS);
- theWindow=GetIndWindowPtr(kMainWindow);
- PrintText(GetWindowTE(theWindow));
- CloseTheWindow(theWindow);
- }
- else
- {
- RemoveHilitePatch();
- PositionDialog('ALRT', smallAlert);
- ParamText("\pPlease close the current text before printing.","\p","\p","\p");
- StopAlert(smallAlert, 0L);
- InstallHilitePatch();
- }
- break;
- }
- }
-